using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Diagnostics;
using ReportPrinting;

namespace LanAnh
{
	public class SamplePrintDialog1 : System.Windows.Forms.Form
    {
		private System.ComponentModel.Container components = null;
		private ReportDocument reportDocument;
        public ReportPrinting.PrintControl PrintControls;

		public SamplePrintDialog1()
		{
			InitializeComponent();

            this.reportDocument = new ReportDocument();
            this.PrintControls.Document = reportDocument;
            // Setup default margins for the document (units of 1/100 inch)
            reportDocument.DefaultPageSettings.Margins.Top = 50;
            reportDocument.DefaultPageSettings.Margins.Bottom = 50;
            reportDocument.DefaultPageSettings.Margins.Left = 75;
            reportDocument.DefaultPageSettings.Margins.Right = 75;

            SampleReportMaker1 reportMaker = new SampleReportMaker1(this);
            //IReportMaker reportMaker = new ReportTest7();

            this.reportDocument.ReportMaker = reportMaker;

            
    	}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.PrintControls = new ReportPrinting.PrintControl();
            this.SuspendLayout();
            // 
            // PrintControls
            // 
            this.PrintControls.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.PrintControls.Document = null;
            this.PrintControls.HideOnPrint = true;
            this.PrintControls.Location = new System.Drawing.Point(64, 168);
            this.PrintControls.Name = "PrintControls";
            this.PrintControls.PrintInBackground = true;
            this.PrintControls.Size = new System.Drawing.Size(392, 40);
            this.PrintControls.TabIndex = 15;
            // 
            // SamplePrintDialog1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(464, 214);
            this.Controls.Add(this.PrintControls);
            this.MinimumSize = new System.Drawing.Size(440, 168);
            this.Name = "SamplePrintDialog1";
            this.Text = "MyPrintDialog";
            this.ResumeLayout(false);

		}
		#endregion

      

	}
}
